home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-02-23 | 52.9 KB | 1,800 lines |
- This is rn 4.4 patch number 3 Part 2 of 3
-
- Please note that rn 4.4 on lib.tmc.edu, gazette.bcm.tmc.edu, bcm.tmc.edu
- and tmc.edu have all been updated to rn 4.4.3 and have this patch installed.
-
- Description: [Most changes came from trn's author, Wayne Davison]
-
- o Configure changes: check for active.times (see new-group comments
- below), termios systems (see termios comments later on), and also
- ask if ORGANIZATION should be ignored. This latter change allows
- systems that use the ORGANIZATION variable for their own purposes
- a chance to only use NEWSORG, thus allowing them to take advantage
- of the default if NEWSORG is undefined (without this, everyone who
- uses rn would _have_ to define NEWSORG to avoid the ORGANIZATION
- define).
- o Pnews.SH: support ignoring of ORGANIZATION; echo --> $echo;
- cat --> $cat.
- o Rnmail.SH: support ignoring of ORGANIZATION.
- o Many files: I've change the parameters of any function trying to
- pass a character (including bool) into a type_int (e.g. char_int).
- This avoids errors for ANSI compilers that don't believe that the
- promoted argument type is valid (they try to pass a char as a char,
- without promoting it to an int, and complain about the old syntax).
- o addng.c: the new new-group-finding code is in here. Optimized the
- writing/reading of newsgroup lists by using "w+" and rewinding the
- file. If ACTIVE_TIMES is defined, the new function find_new_groups()
- uses the NEWGROUPS command (in NNTP) or the ACTIVE_TIMES file (in
- regular rn) to determine new groups. If it's not defined, then the
- find_new_groups() function does the old method (using the code moved
- here from init.c).
- o added the DEB_NNTP define to output some useful NNTP debugging info
- without having all information scroll by like it does with the NNTP
- clientlib's debugging turned on.
- o I optimized a few of the sscanf's to use "%*d" to skip numbers
- that were being ignored, and removed the useless variables.
- o art.c: enhanced the Newsgroups-magic code to show the Newsgroups
- line if it doesn't match the current group. I find this really
- useful for browsing through junk or seeing which articles have
- been redirected with C new's '=' directive.
- o autosub.c: reordered the include files to avoid a problem with
- ANSI compilers.
- o bits.c: fixed a bug in the instr() call in the !NORELAY section
- (the ", TRUE" was in the wrong place).
- o common.h, etc: if TERMIOS is defined, include termios.h and use
- some slightly different term functions. Configure was smart enough
- to NOT set this for suns, and a few other systems that don't like it.
- o common.h: if __STDC__ is defined, turn on the ANSI() prototypes
- automatically.
- o common.h: nullstr[] = ""; actually generates a warning(!) on some
- weird compilers -- changed to nullstr[1] = "";.
- o common.h: "Can't recreate..." message is used in the .newnewsrc
- writing code.
- o config.h.SH: conditionalize the including of the config.sh file
- like the other .SH files do. Also added the new Configure stuff.
- o config.h.SH needs to have its RCS comment character changed to "# ".
- o config.h.SH: all the changes in the tail end are tab/space changes
- that force the code to look pretty in config.h no matter if it is
- preceded by a "#define" or a "/*#undef".
- o final.c: int_catcher() needs an int parameter to agree with ANSI
- compilers. sig_catcher() had an assumed int parameter warning.
- o init.c: more new-group changes (i.e. it calls find_new_groups(),
- and the old new-group code was moved to addng.c).
- o intrp.c: changes to support ignoring ORGANIZATION. A slight tweak
- allows the organization file not not end in a newline.
- o intrp.c: moved the tmpbuf[] into the #ifdefs where it is used (to
- avoid an "unused" warning. In the process, discovered a bug in the
- non-BSD code that tries to copy an uninitialized (now undefined) tmpbuf
- into buf (when it should be copying 's').
- o last.c: extended the contents of .rnlast to support the new-group
- code. Handles reading the old .rnlast style gracefully.
- o ng.c: reset the value of extractdest and extractprog when entering
- a newsgroup. This allows someone to set SAVEDIR to a roving value
- (like %c) and have an 'e' in group1 not affect an 'e' in group2.
- Within the group, each 'e' command will repeat the last destination
- and program if no parameters are used.
- o ng.c: note the values returned by the GROUP command in rrn so that
- we can add new articles that came in since our last fetch of the
- active file. I've upgraded the ngmax[] array to non-debug status,
- and now use it to keep the group's maximum value (like abs1st[]
- does for the minimum). This allows getngsize() to return a value
- higher than what is contained in the active file copy, and also
- to fetch a new copy of the active file if enough time has elapsed
- since our last fetch.
- o ng.c: fixed forcelast to get cleared before processing a command,
- and to get set on '-' just in case it goes to the end of the group.
- o ng.c: fixed some indent problems.
- o ngdata.c: added the lastactfetch variable (rrn) to keep track of
- when the active file copy was last fetched.
- o ngdata.c: getngsize() uses the value in ngmax[] to override the
- high active-file-copy value. If ngmax[] is bigger and enough time
- has gone by, a new copy of the active file is fetched.
- o ngdata.c: more indent tweaks.
- o ngdata.c: fixed a1st to be a long (it might have been int or long,
- and sscanf() was expecting an int), and added "last" to sscanf the
- high newsgroup value at the same time abs1st is being set. Fixed
- a problem with the sscanf being executed if the NNTP command failed.
- o ngdata.c: minor tweak to the "notdef" comment to make it accurate.
- o ngdata.h: MINFETCHTIME is set for 5 minutes before another active
- fetch is allowed.
- o rcln.c: minor optimization to remove tmpp; removed #ifdef DEBUGGING
- around the ngmax[] array; put \n's before the bogus newsgroup
- warnings.
- o Allow some slack in the "newsgroup was reset" check to allow for the
- interaction of the ngmax[] array setting a high value in .newsrc
- that a cached version of the active file doesn't reflect yet (can
- happen when starting up rn in some rare cases).
- o rcstuff.c: broke out the code that parses the newsrc line into the
- function parse_rcline(). This allows the addition of a new function,
- abandon_ng() that restores the startup values for the current group
- from the .oldnewsrc file (bound to the 'A' command at the newsgroup
- level).
- o rcstuff.c: made addnewbydefault a global variable so that it could
- be reset by the 'a' command. Without this, typing 'N' during the
- startup code would render the 'a' command useless, since all the
- groups you might want to add get an immediate 'n'o answer.
- o rcstuff.c: the "if (mode == 'i')" check is needed to keep the
- new-newsgroup-finding code sane.
- o rcstuff.c: I changed the code to add groups with a space after
- the ":" or "!". It's not really required, but it avoids having the
- construct "group!187,193" show up in your .newsrc file when cross-
- posted articles are marked as read for unsubscribed groups.
- o rcstuff.c: the .newnewsrc-writing code uses the "cantrecreate"
- message from common.h, and the comments and indentation are fixed,
- as well as one extra ferror() check added.
- o rcstuff.c: the newsrc-array-growing code now zeros the ngnum array.
- o respond.c: moved a negation used with strlen() to avoid problems if
- strlen() is declared to be unsigned.
- o respond.c: changed the behavior of the 'f' command to ask the
- user if it is an unrelated topic.
- o rn.c: added the "direction" flag that makes the 'p' and 'P' command
- work in all circumstances. Without this, if you have a restriction
- enabled and an empty non-matching group in the way, it won't backup
- at all (and might even go forward!).
- o rn.c: your change for outputting the prompt later in the game allows
- for the removal of the reprompt_newsgroup label with the moving of
- the dfltcmd initialization also.
- o rn.c: when rrn visits the end of the newsgroups prompt, it will
- fetch a new copy of the active file if enough time has elapsed.
- o rn.c: changed the "not found" prompt to mention the 'a' command
- (which is much more useful than 'g' alone). Made 'g's error
- message a little more clear too.
- o rn.c: more indentation twiddles.
- o rn.c: removed the check for ' ' from the catchup code, because it's
- getting changed into the default command by setdef().
- o rn.c: added the 'A' command to abandon the current newsgroup's
- changes back to the startup state (which is contained in .oldnewsrc).
- o rn.c: have the 'a' command reset addnewbydefault to 0.
- o term.c: renamed ospeed "outspeed" so that it doesn't conflict with
- some weird system's polution of the name space.
- o term.c: support for the termios systems added.
- o term.c: winch_catcher() needed an int parameter for ANSI systems.
- o util.c: reorganized a couple returns to avoid warnings about not
- returning a value in a function.
- o Configure now knows about DG Avion.
-
- Install this patch using Larry Wall's patch program. You MUST install all
- three parts or you will not have a functional program.
-
- Index: addng.c
- Prereq: 4.4.2.1
- *** addng.c Sun Dec 1 12:08:44 1991
- --- ../rn4.4.3/addng.c Sat Feb 22 21:54:59 1992
- ***************
- *** 1,6 ****
- ! /* $Id: addng.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- *
- * $Log: addng.c,v $
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- --- 1,9 ----
- ! /* $Id: addng.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: addng.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- ***************
- *** 38,43 ****
- --- 41,47 ----
- #include "final.h"
- #include "INTERN.h"
- #include "addng.h"
- + #include <time.h>
-
- void
- addng_init()
- ***************
- *** 50,76 ****
-
- bool
- newlist(munged,checkinlist)
- ! bool munged; /* are we scanning the whole file? */
- ! bool checkinlist;
- {
- char *tmpname;
- register char *s, *status;
- register NG_NUM ngnum;
- long birthof();
-
- ! tmpname = savestr(filexp(RNEWNAME));
- ! tmpfp = fopen(tmpname,"w");
- if (tmpfp == Nullfp) {
- printf(cantcreate,tmpname) FLUSH;
- return FALSE;
- }
- while (fgets(buf,LBUFLEN,actfp) != Nullch) {
- /* Check if they want to break out of the new newsgroups search */
- if (int_count) {
- int_count = 0;
- fclose(tmpfp);
- - UNLINK(tmpname);
- - free(tmpname);
- return FALSE;
- }
- if (s = index(buf,' ')) {
- --- 54,82 ----
-
- bool
- newlist(munged,checkinlist)
- ! bool_int munged; /* are we scanning the whole file? */
- ! bool_int checkinlist;
- {
- char *tmpname;
- register char *s, *status;
- register NG_NUM ngnum;
- + #ifndef ACTIVE_TIMES
- long birthof();
- + #endif
-
- ! tmpname = filexp(RNEWNAME);
- ! tmpfp = fopen(tmpname,"w+");
- if (tmpfp == Nullfp) {
- printf(cantcreate,tmpname) FLUSH;
- return FALSE;
- }
- + UNLINK(tmpname); /* be nice to the world */
- +
- while (fgets(buf,LBUFLEN,actfp) != Nullch) {
- /* Check if they want to break out of the new newsgroups search */
- if (int_count) {
- int_count = 0;
- fclose(tmpfp);
- return FALSE;
- }
- if (s = index(buf,' ')) {
- ***************
- *** 81,92 ****
- /* since = groups are refiling to another group, just
- ignore their existence */
- continue;
- ! #ifdef OLD_ADD_METHOD
- ! if (find_ng(buf) == nextrcline &&
- ! (checkinlist ?
- ! (inlist(buf)) :
- ! (birthof(buf,(ART_NUM)atol(s)) > lasttime)
- ! )
- #else
- if (checkinlist ?
- (inlist(buf) && ((ngnum = find_ng(buf)) == nextrcline
- --- 87,95 ----
- /* since = groups are refiling to another group, just
- ignore their existence */
- continue;
- ! #ifdef ACTIVE_TIMES
- ! if (inlist(buf) && ((ngnum = find_ng(buf)) == nextrcline
- ! || toread[ngnum] == TR_UNSUB)
- #else
- if (checkinlist ?
- (inlist(buf) && ((ngnum = find_ng(buf)) == nextrcline
- ***************
- *** 94,100 ****
- : (find_ng(buf) == nextrcline
- && birthof(buf,(ART_NUM)atol(s)) > lasttime)
- #endif
- ! ) {
- /* if not in .newsrc and younger */
- /* than the last time we checked */
- fprintf(tmpfp,"%s\n",buf);
- --- 97,103 ----
- : (find_ng(buf) == nextrcline
- && birthof(buf,(ART_NUM)atol(s)) > lasttime)
- #endif
- ! ) {
- /* if not in .newsrc and younger */
- /* than the last time we checked */
- fprintf(tmpfp,"%s\n",buf);
- ***************
- *** 104,111 ****
- else { /* not really a new group */
- if (!munged) { /* did we assume not munged? */
- fclose(tmpfp); /* then go back, knowing that */
- - UNLINK(tmpname);
- - free(tmpname);
- return TRUE; /* active file was indeed munged */
- }
- }
- --- 107,112 ----
- ***************
- *** 119,140 ****
-
- /* we have successfully generated the list */
-
- ! fclose(tmpfp);
- ! tmpfp = fopen(tmpname,"r");
- ! UNLINK(tmpname); /* be nice to the world */
- ! if (tmpfp == Nullfp) {
- ! printf(cantopen,tmpname) FLUSH;
- ! return FALSE;
- ! }
- while (fgets(buf,LBUFLEN,tmpfp) != Nullch) {
- buf[strlen(buf)-1] = '\0';
- get_ng(buf,TRUE); /* add newsgroup, maybe */
- }
- fclose(tmpfp); /* be nice to ourselves */
- - free(tmpname);
- return FALSE; /* do not call us again */
- }
-
- /* return creation time of newsgroup */
-
- long
- --- 120,284 ----
-
- /* we have successfully generated the list */
-
- ! fseek(tmpfp,0L,0); /* rewind back to the beginning */
- while (fgets(buf,LBUFLEN,tmpfp) != Nullch) {
- buf[strlen(buf)-1] = '\0';
- get_ng(buf,TRUE); /* add newsgroup, maybe */
- }
- fclose(tmpfp); /* be nice to ourselves */
- return FALSE; /* do not call us again */
- }
-
- + #ifdef ACTIVE_TIMES
- + #ifdef SERVER
- +
- + bool
- + find_new_groups()
- + {
- + char *tmpname;
- + register char *s;
- + struct tm *ts;
- + long now;
- + NG_NUM oldnext = nextrcline; /* remember # lines in newsrc */
- +
- + tmpname = filexp(RNEWNAME);
- + tmpfp = fopen(tmpname,"w+");
- + if (tmpfp == Nullfp) {
- + printf(cantcreate,tmpname) FLUSH;
- + return FALSE;
- + }
- + UNLINK(tmpname); /* be nice to the world */
- +
- + time(&now);
- + ts = gmtime(&lastnewtime);
- + sprintf(ser_line, "NEWGROUPS %02d%02d%02d %02d%02d%02d GMT",
- + ts->tm_year % 100, ts->tm_mon+1, ts->tm_mday,
- + ts->tm_hour, ts->tm_min, ts->tm_sec);
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf(">%s\n", ser_line) FLUSH;
- + #endif
- + put_server(ser_line);
- + nntp_get(ser_line, sizeof(ser_line));
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf("<%s\n", ser_line) FLUSH;
- + #endif
- + if (*ser_line != CHAR_OK) { /* and then see if that's ok */
- + error_exit:
- + fclose(tmpfp);
- + printf("Can't get new groups from server:\n%s\n", ser_line);
- + return FALSE;
- + }
- +
- + while (1) {
- + if (nntp_get(ser_line, sizeof(ser_line)) < 0)
- + goto error_exit;
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf("<%s\n", ser_line) FLUSH;
- + #endif
- + if (ser_line[0] == '.')
- + break;
- + if ((s = index(ser_line, ' ')) != Nullch)
- + *s = '\0';
- + fprintf(tmpfp,"%s\n",ser_line);
- + }
- +
- + /* we have successfully generated the list */
- +
- + if (ftell(tmpfp)) {
- + fputs("\nFinding new newsgroups:\n",stdout) FLUSH;
- +
- + fseek(tmpfp,0L,0); /* rewind back to the beginning */
- + while (fgets(buf,LBUFLEN,tmpfp) != Nullch) {
- + buf[strlen(buf)-1] = '\0';
- + get_ng(buf,FALSE); /* add newsgroup, maybe */
- + }
- + lastnewtime = now; /* remember when we found new groups */
- + } /* (ends up back in .rnlast) */
- + fclose(tmpfp); /* be nice to ourselves */
- +
- + return oldnext != nextrcline;
- + }
- + #else /* not SERVER */
- +
- + bool
- + find_new_groups()
- + {
- + register char *s;
- + long lastone;
- + NG_NUM oldnext = nextrcline; /* remember # lines in newsrc */
- +
- + fstat(fileno(actfp),&filestat); /* find active file size */
- + lastactsiz = filestat.st_size; /* just to save it in .rnlast */
- +
- + stat(ACTIVE_TIMES,&filestat); /* did active.times file grow? */
- + if (filestat.st_size == lastnewsize)
- + return FALSE;
- + lastnewsize = filestat.st_size;
- +
- + fputs("\nChecking for new newsgroups...\n",stdout) FLUSH;
- +
- + s = filexp(ACTIVE_TIMES);
- + tmpfp = fopen(s,"r");
- + if (tmpfp == Nullfp) {
- + printf(cantopen,s) FLUSH;
- + return FALSE;
- + }
- + lastone = time(Null(time_t*)) - 24L * 60 * 60 - 1;
- + while (fgets(buf,LBUFLEN,tmpfp) != Nullch) {
- + if ((s = index(buf, ' ')) != Nullch)
- + if ((lastone = atol(s+1)) >= lastnewtime) {
- + char tmpbuf[80];
- + *s = '\0';
- + if (findact(tmpbuf, buf, s - buf, 0L) >= 0)
- + get_ng(buf,FALSE); /* add newsgroup, maybe */
- + }
- + }
- + fclose(tmpfp);
- + lastnewtime = lastone+1; /* remember time of last new group */
- + /* (ends up back in .rnlast) */
- + return oldnext != nextrcline;
- + }
- + #endif /* SERVER */
- + #else /* not ACTIVE_TIMES */
- +
- + bool
- + find_new_groups()
- + {
- + long oldactsiz = lastactsiz;
- + NG_NUM oldnext = nextrcline; /* remember # lines in newsrc */
- +
- + fstat(fileno(actfp),&filestat); /* did active file grow? */
- +
- + if (filestat.st_size == lastactsiz)
- + return FALSE;
- + lastactsiz = filestat.st_size; /* remember new size */
- +
- + #ifdef VERBOSE
- + IF(verbose)
- + fputs("\nChecking active file for new newsgroups...\n",stdout) FLUSH;
- + ELSE
- + #endif
- + #ifdef TERSE
- + fputs("\nNew newsgroups:\n",stdout) FLUSH;
- + #endif
- +
- + #ifdef FASTNEW /* bad soft ptrs -> edited active */
- + if (!writesoft && oldactsiz) { /* maybe just do tail of file? */
- + fseek(actfp,oldactsiz-NL_SIZE,0);
- + fgets(buf,LBUFLEN,actfp);
- + if (*buf == '\n' && !newlist(FALSE,FALSE))
- + goto bugout;
- + }
- + #endif
- + fseek(actfp,0L,0); /* rewind active file */
- + newlist(TRUE,FALSE); /* sure hope they use hashing... */
- + bugout:
- + return oldnext != nextrcline;
- + }
- +
- /* return creation time of newsgroup */
-
- long
- ***************
- *** 146,157 ****
- long time();
-
- #ifdef SERVER /* ngsize not used */
- ! int x,tot,min,max;
- sprintf(tst,"GROUP %s",ngnam);
- put_server(tst);
- (void) nntp_get(tst, sizeof(tst));
- if (*tst != CHAR_OK) return(0); /* not a real group */
- ! (void) sscanf(tst,"%d%d%d%d",&x,&tot,&min,&max);
- if (tot > 0) return(time(Null(long *)));
- else return(0);
- #else /* not SERVER */
- --- 290,309 ----
- long time();
-
- #ifdef SERVER /* ngsize not used */
- ! long tot;
- sprintf(tst,"GROUP %s",ngnam);
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf(">%s\n", tst) FLUSH;
- + #endif
- put_server(tst);
- (void) nntp_get(tst, sizeof(tst));
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf("<%s\n", tst) FLUSH;
- + #endif
- if (*tst != CHAR_OK) return(0); /* not a real group */
- ! (void) sscanf(tst,"%*d%ld",&tot);
- if (tot > 0) return(time(Null(long *)));
- else return(0);
- #else /* not SERVER */
- ***************
- *** 165,170 ****
- --- 317,323 ----
-
- #endif
- }
- + #endif /* ACTIVE_TIMES */
-
- bool
- scanactive()
- Index: addng.h
- Prereq: 4.4
- *** addng.h Sat Nov 9 14:41:36 1991
- --- ../rn4.4.3/addng.h Sat Feb 22 21:54:04 1992
- ***************
- *** 1,6 ****
- ! /* $Id: addng.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: addng.h,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: addng.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: addng.h,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 22,28 ****
-
- void addng_init ANSI((void));
- #ifdef FINDNEWNG
- ! bool newlist ANSI((bool,bool));
- long birthof ANSI((char *,ART_NUM));
- bool scanactive ANSI((void));
- #endif
- --- 25,35 ----
-
- void addng_init ANSI((void));
- #ifdef FINDNEWNG
- ! bool newlist ANSI((bool_int,bool_int));
- ! # ifdef ACTIVE_TIMES
- ! bool find_new_groups ANSI((void));
- ! # else
- long birthof ANSI((char *,ART_NUM));
- + # endif
- bool scanactive ANSI((void));
- #endif
- Index: art.c
- Prereq: 4.4.2.1
- *** art.c Sun Dec 1 12:08:47 1991
- --- ../rn4.4.3/art.c Sat Feb 22 21:54:38 1992
- ***************
- *** 1,4 ****
- ! /* $Id: art.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- *
- *
- *
- --- 1,4 ----
- ! /* $Id: art.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- *
- *
- ***************
- *** 97,103 ****
- register int outputok;
- #endif
-
- - /* if (fstat(artfp->_file,&filestat)) ... does not work on Apollos */
- if (fstat(fileno(artfp),&filestat))
- /* get article file stats */
- return DA_CLEAN;
- --- 97,102 ----
- ***************
- *** 225,231 ****
- #endif
- if (in_header && htype[in_header].ht_flags & HT_MAGIC) {
- if (in_header == NGS_LINE) {
- ! hide_this_line = (index(art_buf,',') == Nullch);
- }
- else if (in_header == EXPIR_LINE) {
- if (!(htype[EXPIR_LINE].ht_flags & HT_HIDE))
- --- 224,235 ----
- #endif
- if (in_header && htype[in_header].ht_flags & HT_MAGIC) {
- if (in_header == NGS_LINE) {
- ! if ((s = index(art_buf,'\n')) != Nullch)
- ! *s = '\0';
- ! hide_this_line = (index(art_buf,',') == Nullch)
- ! && strEQ(art_buf+12, ngname);
- ! if (s != Nullch)
- ! *s = '\n';
- }
- else if (in_header == EXPIR_LINE) {
- if (!(htype[EXPIR_LINE].ht_flags & HT_HIDE))
- Index: artio.c
- Prereq: 4.4
- *** artio.c Sat Nov 9 14:42:30 1991
- --- ../rn4.4.3/artio.c Sat Feb 22 21:55:08 1992
- ***************
- *** 1,6 ****
- ! /* $Id: artio.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: artio.c,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: artio.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: artio.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 130,140 ****
- --- 133,151 ----
- sprintf(ser_line, "ARTICLE %ld", (long)artnum);
- break;
- }
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf(">%s\n", ser_line) FLUSH;
- + #endif
- put_server(ser_line); /* ask the server for the article */
- if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
- fprintf(stderr, "\nrrn: Unexpected close of server socket.\n");
- finalize(1);
- }
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf("<%s\n", ser_line) FLUSH;
- + #endif
- if (*ser_line == CHAR_FATAL) { /* Fatal error */
- fprintf(stderr,"\nrrn: %s\n",ser_line);
- finalize(1);
- Index: artsrch.c
- Prereq: 4.4.2.1
- *** artsrch.c Sun Dec 1 12:08:58 1991
- --- ../rn4.4.3/artsrch.c Sat Feb 22 21:55:00 1992
- ***************
- *** 1,6 ****
- ! /* $Id: artsrch.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- *
- * $Log: artsrch.c,v $
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- --- 1,9 ----
- ! /* $Id: artsrch.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: artsrch.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- ***************
- *** 275,281 ****
- wanted(compex, artnum, scope)
- COMPEX *compex;
- ART_NUM artnum;
- ! char scope;
- {
- if (!scope) {
- char subj_buf[266];
- --- 278,284 ----
- wanted(compex, artnum, scope)
- COMPEX *compex;
- ART_NUM artnum;
- ! char_int scope;
- {
- if (!scope) {
- char subj_buf[266];
- Index: artsrch.h
- Prereq: 4.4
- *** artsrch.h Sat Nov 9 14:41:28 1991
- --- ../rn4.4.3/artsrch.h Sat Feb 22 21:53:56 1992
- ***************
- *** 1,6 ****
- ! /* $Id: artsrch.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: artsrch.h,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: artsrch.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: artsrch.h,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 50,55 ****
- void artsrch_init ANSI((void));
- #ifdef ARTSEARCH
- int art_search ANSI((char *, int, int));
- ! bool wanted ANSI((COMPEX *, ART_NUM, char));
- /* return TRUE if current article matches pattern */
- #endif
- --- 53,58 ----
- void artsrch_init ANSI((void));
- #ifdef ARTSEARCH
- int art_search ANSI((char *, int, int));
- ! bool wanted ANSI((COMPEX *, ART_NUM, char_int));
- /* return TRUE if current article matches pattern */
- #endif
- Index: autosub.c
- Prereq: 4.4
- *** autosub.c Sat Nov 9 14:42:44 1991
- --- ../rn4.4.3/autosub.c Sat Feb 22 21:53:54 1992
- ***************
- *** 1,7 ****
- /*
- ! * $Id: autosub.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: autosub.c,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,10 ----
- /*
- ! * $Id: autosub.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: autosub.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 23,30 ****
-
- #include "EXTERN.h"
- #include "common.h"
- - #include "ngsrch.h"
- #include "search.h"
- #include "util.h"
- #include "INTERN.h"
- #include "autosub.h"
- --- 26,33 ----
-
- #include "EXTERN.h"
- #include "common.h"
- #include "search.h"
- + #include "ngsrch.h"
- #include "util.h"
- #include "INTERN.h"
- #include "autosub.h"
- Index: bits.c
- Prereq: 4.4
- *** bits.c Sat Nov 9 14:42:07 1991
- --- ../rn4.4.3/bits.c Sat Feb 22 21:54:46 1992
- ***************
- *** 1,6 ****
- ! /* $Id: bits.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: bits.c,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: bits.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: bits.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 397,403 ****
- free(inews_site);
- #ifndef NORELAY
- rver_buf = fetchlines(artnum,RVER_LINE);
- ! if ((t = instr(rver_buf,"; site "), TRUE) == Nullch)
- #else /* NORELAY */
- /* In version 2.10.3 of news or afterwards, the Relay-Version
- * and Posting-Version header lines have been removed. For
- --- 400,406 ----
- free(inews_site);
- #ifndef NORELAY
- rver_buf = fetchlines(artnum,RVER_LINE);
- ! if ((t = instr(rver_buf,"; site ", TRUE)) == Nullch)
- #else /* NORELAY */
- /* In version 2.10.3 of news or afterwards, the Relay-Version
- * and Posting-Version header lines have been removed. For
- Index: common.h
- Prereq: 4.4.2.1
- *** common.h Sun Dec 1 12:10:08 1991
- --- ../rn4.4.3/common.h Sat Feb 22 21:54:31 1992
- ***************
- *** 1,6 ****
- ! /* $Id: common.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- *
- * $Log: common.h,v $
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- --- 1,9 ----
- ! /* $Id: common.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: common.h,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- ***************
- *** 52,58 ****
- --- 55,65 ----
- #ifdef TERMIO
- # include <termio.h>
- #else
- + # ifdef TERMIOS
- + # include <termios.h>
- + # else
- # include <sgtty.h>
- + # endif
- #endif
-
- #ifdef GETPWENT
- ***************
- *** 89,94 ****
- --- 96,103 ----
- /* some handy defs */
-
- #define bool char
- + #define bool_int int
- + #define char_int int
- #ifndef TRUE
- #define TRUE (1)
- #endif
- ***************
- *** 148,154 ****
- * %I Inclusion indicator
- * %l News administrator login name
- * %L Login name (yours)
- ! * %M Number of articles markd with M
- * %n Newsgroups from source article
- * %N Full name (yours)
- * %o Organization (yours)
- --- 157,163 ----
- * %I Inclusion indicator
- * %l News administrator login name
- * %L Login name (yours)
- ! * %M Number of articles marked with M
- * %n Newsgroups from source article
- * %N Full name (yours)
- * %o Organization (yours)
- ***************
- *** 718,724 ****
-
- /* what to do with ansi prototypes -- '()' == ignore, 'x' == use */
- #ifndef ANSI
- ! # define ANSI(x) ()
- #endif
-
- /* how many characters is a newline in a text file? */
- --- 727,737 ----
-
- /* what to do with ansi prototypes -- '()' == ignore, 'x' == use */
- #ifndef ANSI
- ! # ifdef __STDC__
- ! # define ANSI(x) x
- ! # else
- ! # define ANSI(x) ()
- ! # endif
- #endif
-
- /* how many characters is a newline in a text file? */
- ***************
- *** 775,780 ****
- --- 788,794 ----
-
- #ifdef DEBUGGING
- EXT int debug INIT(0); /* -D */
- + # define DEB_NNTP 16
- # define DEB_INNERSRCH 32
- # define DEB_FILEXP 64
- # define DEB_HASH 128
- ***************
- *** 839,845 ****
- extern errno;
- /* Factored strings */
-
- ! EXT char nullstr[] INIT("");
- EXT char sh[] INIT(SH);
- EXT char defeditor[] INIT(DEFEDITOR);
- EXT char hforhelp[] INIT("Type h for help.\n");
- --- 853,859 ----
- extern errno;
- /* Factored strings */
-
- ! EXT char nullstr[1] INIT("");
- EXT char sh[] INIT(SH);
- EXT char defeditor[] INIT(DEFEDITOR);
- EXT char hforhelp[] INIT("Type h for help.\n");
- ***************
- *** 850,855 ****
- --- 864,870 ----
- EXT char unsubto[] INIT("\n\nUnsubscribed to newsgroup %s\n");
- EXT char cantopen[] INIT("Can't open %s\n");
- EXT char cantcreate[] INIT("Can't create %s\n");
- + EXT char cantrecreate[] INIT("Can't recreate %s -- restoring older version.\n");
-
- #ifdef VERBOSE
- EXT char nocd[] INIT("Can't chdir to directory %s\n");
- Index: config.h.SH
- Prereq: 4.4.2.1
- *** config.h.SH Sun Dec 1 12:08:04 1991
- --- ../rn4.4.3/config.h.SH Sat Feb 22 21:55:06 1992
- ***************
- *** 1,7 ****
- : create config.h file
- echo "Extracting config.h (with variable substitutions)"
- ! . ./config.sh
- !
- case "$hostfile" in
- '') usehostfile='undef';;
- *) usehostfile='define';;
- --- 1,12 ----
- : create config.h file
- + case $CONFIG in
- + '') . ./config.sh ;;
- + esac
- echo "Extracting config.h (with variable substitutions)"
- ! case "$activetimes" in
- ! 'none') acttimes='undef';;
- ! *) acttimes='define';;
- ! esac
- case "$hostfile" in
- '') usehostfile='undef';;
- *) usehostfile='define';;
- ***************
- *** 16,31 ****
- * Feel free to modify any of this as the need arises. Note, however,
- * that running config.h.SH again will wipe out any changes you've made.
- * For a more permanent change edit config.sh and rerun config.h.SH.
- ! * $Id: config.h.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- *
- * $Log: config.h.SH,v $
- ! # Revision 4.4.2.1 1991/12/01 18:05:42 sob
- ! # Fixed problems with CTRLA flag.
- ! #
- ! # Revision 4.4 1991/09/09 20:18:23 sob
- ! # release 4.4
- ! #
- *
- *
- */
- /* This software is Copyright 1991 by Stan Barber.
- --- 21,39 ----
- * Feel free to modify any of this as the need arises. Note, however,
- * that running config.h.SH again will wipe out any changes you've made.
- * For a more permanent change edit config.sh and rerun config.h.SH.
- ! * $Id: config.h.SH,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: config.h.SH,v $
- ! * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- ! *Release 4.4 Patchlevel 3
- ! *
- ! * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- ! * Fixed problems with CTRLA flag.
- ! *
- ! * Revision 4.4 1991/09/09 20:18:23 sob
- ! * release 4.4
- *
- + *
- *
- */
- /* This software is Copyright 1991 by Stan Barber.
- ***************
- *** 43,49 ****
-
- /* name of the site. May be overridden by HOSTFILE, gethostname, uname, etc. */
- #define SITENAME "$sitename"
- ! #$usehostfile HOSTFILE "$hostfile" /* */
-
- /* domain name for the site */
- #define OURDOMAIN "$domain"
- --- 51,57 ----
-
- /* name of the site. May be overridden by HOSTFILE, gethostname, uname, etc. */
- #define SITENAME "$sitename"
- ! #$usehostfile HOSTFILE "$hostfile" /* defined if we read the hostname from a file */
-
- /* domain name for the site */
- #define OURDOMAIN "$domain"
- ***************
- *** 51,58 ****
- /* name of the organization, may be a file name */
- #define ORGNAME "$orgname"
-
- /* login name of news administrator, if any. */
- ! #$isadmin NEWSADMIN "$newsadmin"
-
- /* news library, may use only ~ and %l expansion */
- #define LIB "$lib"
- --- 59,69 ----
- /* name of the organization, may be a file name */
- #define ORGNAME "$orgname"
-
- + /* ignore the ORGANIZATION environment variable */
- + #$ignoreorg IGNOREORG /**/
- +
- /* login name of news administrator, if any. */
- ! #$isadmin NEWSADMIN "$newsadmin" /**/
-
- /* news library, may use only ~ and %l expansion */
- #define LIB "$lib"
- ***************
- *** 66,71 ****
- --- 77,85 ----
- /* location of the active file, may use ~ expansion, %x and %l */
- #define ACTIVE "$active"
-
- + /* define where the active.times file is kept if we're using it */
- + #$acttimes ACTIVE_TIMES "$activetimes" /* including name */
- +
- /* location of spooled mail */
- #define MAILFILE "$maildir"
-
- ***************
- *** 85,145 ****
- #define CANCEL "$inews -h <%h"
-
- /* distribution groups */
- ! #define LOCDIST "$locpref"
- ! #define ORGDIST "$orgpref"
- ! #define CITYDIST "$citypref"
- #define STATEDIST "$statepref"
- #define CNTRYDIST "$cntrypref"
- ! #define CONTDIST "$contpref"
- !
-
- ! #$strchr index strchr /* cultural */
- ! #$strchr rindex strrchr /* differences? */
- ! #$memcpy bcopy(s,d,n) memcpy((char*)d,(char*)s,(int)n) /* Different */
- ! #$memcpy bzero(d,n) memset((char*)d,0,(int)n) /* flavors. */
- ! #$rename RENAME /* is rename() a system call? */
- ! #$truncate TRUNCATE /* is truncate() available? */
- ! #$chsize CHSIZE /* is chsize() available? */
- ! #$tzset TZSET /* modern timezone functions? */
- #$novoid void int /* is void to be avoided? */
- #$novfork vfork fork /* is vfork too virtual? */
- ! #$sunos4 SUNOS4 /* running SunOS 4.X? */
- ! #$eunice EUNICE /* no linking? */
- ! #$eunice VMS /* not currently used, here just in case */
- ! #$getcwd GETCWD /* do we have getcwd()? */
- ! #$getwd GETWD /* do we have getwd()? */
- ! #$usendir USENDIR /* include ndir.c? */
- ! #$libndir LIBNDIR /* include /usr/include/ndir.h? */
- ! #define DIRTYPE $dirtype
- #ifndef USENDIR
- ! #define DIRINC $dirinc
- #endif
- ! #$mininact MININACT /* include 2.10.2 optimization? */
- ! #$portable PORTABLE /* do we do extra lookups to start up? */
- ! #$passnam PASSNAMES /* do names come from the passwd file? */
- /* (undef to take name from ~/.fullname) */
- ! #$berknam BERKNAMES /* if so, are they Berkeley format? */
- /* (that is, ":name,stuff:") */
- ! #$usgnam USGNAMES /* or are they USG format? */
- /* (that is, ":stuff-name(stuff):") */
- ! #$whoami WHOAMI /* should we include whoami.h? */
- ! #$rdchk RDCHK /* do we have rdchk()? */
- ! #$termio TERMIO /* is this a termio system? */
- ! #$fcntl FCNTL /* should we include fcntl.h? */
- ! #$ioctl IOCTL /* are ioctl args all defined in one place? */
- ! #$ptem PTEM /* has the ptem.h include file ? */
- ! #$normsig NORMSIG /* use signal rather than sigset? */
- ! #$sigblock SIGBLOCK /* use sigblock and sigsetmask */
- ! #$sighold HAVESIGHOLD /* use sighold and sigrelse */
- ! #define SIGRET $sigret /* what does signal() return? */
- ! #$havetlib HAVETERMLIB /* do we have termlib-style routines? */
- ! #$getuidgid GETUIDGID /* allow setuid (if possible) */
- ! #$getpwent GETPWENT /* should we include getpwent? */
- ! #$internet INTERNET /* does our mailer do INTERNET addressing? */
- ! #$gethostname GETHOSTNAME /* do we have a gethostname function? */
- ! #$douname DOUNAME /* do we have a uname function? */
- ! #$phostname PHOSTNAME "$hostcmd" /* how to get host name with popen */
- ! #$norelay NORELAY /* 2.10.3 doesn't have Relay-Version line */
- ! #$isrrn SERVER /* rrn server code */
- ! #$isrrn SERVER_FILE "$serverfile" /* news server file */
- EOT
- --- 99,159 ----
- #define CANCEL "$inews -h <%h"
-
- /* distribution groups */
- ! #define LOCDIST "$locpref"
- ! #define ORGDIST "$orgpref"
- ! #define CITYDIST "$citypref"
- #define STATEDIST "$statepref"
- #define CNTRYDIST "$cntrypref"
- ! #define CONTDIST "$contpref"
-
- ! #$strchr index strchr /* cultural */
- ! #$strchr rindex strrchr /* differences? */
- ! #$memcpy bcopy(s,d,n) memcpy((char*)d,(char*)s,(int)n) /* Different */
- ! #$memcpy bzero(d,n) memset((char*)d,0,(int)n) /* flavors. */
- ! #$rename RENAME /* is rename() a system call? */
- ! #$truncate TRUNCATE /* is truncate() available? */
- ! #$chsize CHSIZE /* is chsize() available? */
- ! #$tzset TZSET /* modern timezone functions? */
- #$novoid void int /* is void to be avoided? */
- #$novfork vfork fork /* is vfork too virtual? */
- ! #$sunos4 SUNOS4 /* running SunOS 4.X? */
- ! #$eunice EUNICE /* no linking? */
- ! #$eunice VMS /* not currently used, here just in case */
- ! #$getcwd GETCWD /* do we have getcwd()? */
- ! #$getwd GETWD /* do we have getwd()? */
- ! #$usendir USENDIR /* include ndir.c? */
- ! #$libndir LIBNDIR /* include /usr/include/ndir.h? */
- ! #define DIRTYPE $dirtype
- #ifndef USENDIR
- ! #define DIRINC $dirinc
- #endif
- ! #$mininact MININACT /* include 2.10.2 optimization? */
- ! #$portable PORTABLE /* do we do extra lookups to start up? */
- ! #$passnam PASSNAMES /* do names come from the passwd file? */
- /* (undef to take name from ~/.fullname) */
- ! #$berknam BERKNAMES /* if so, are they Berkeley format? */
- /* (that is, ":name,stuff:") */
- ! #$usgnam USGNAMES /* or are they USG format? */
- /* (that is, ":stuff-name(stuff):") */
- ! #$whoami WHOAMI /* should we include whoami.h? */
- ! #$rdchk RDCHK /* do we have rdchk()? */
- ! #$termio TERMIO /* is this a termio system? */
- ! #$termios TERMIOS /* is this a termios system? */
- ! #$fcntl FCNTL /* should we include fcntl.h? */
- ! #$ioctl IOCTL /* are ioctl args all defined in one place? */
- ! #$ptem PTEM /* has the ptem.h include file ? */
- ! #$normsig NORMSIG /* use signal rather than sigset? */
- ! #$sigblock SIGBLOCK /* use sigblock and sigsetmask */
- ! #$sighold HAVESIGHOLD /* use sighold and sigrelse */
- ! #define SIGRET $sigret /* what does signal() return? */
- ! #$havetlib HAVETERMLIB /* do we have termlib-style routines? */
- ! #$getuidgid GETUIDGID /* allow setuid (if possible) */
- ! #$getpwent GETPWENT /* should we include getpwent? */
- ! #$internet INTERNET /* does our mailer do INTERNET addressing? */
- ! #$gethostname GETHOSTNAME /* do we have a gethostname function? */
- ! #$douname DOUNAME /* do we have a uname function? */
- ! #$phostname PHOSTNAME "$hostcmd" /* how to get host name with popen */
- ! #$norelay NORELAY /* 2.10.3 doesn't have Relay-Version line */
- ! #$isrrn SERVER /* rrn server code */
- ! #$isrrn SERVER_FILE "$serverfile" /* news server file */
- EOT
- Index: final.c
- Prereq: 4.4.2.1
- *** final.c Sun Dec 1 12:09:11 1991
- --- ../rn4.4.3/final.c Sat Feb 22 21:55:07 1992
- ***************
- *** 1,6 ****
- ! /* $Id: final.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- *
- * $Log: final.c,v $
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- --- 1,9 ----
- ! /* $Id: final.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: final.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- ***************
- *** 34,42 ****
- --- 37,52 ----
- #include "rcstuff.h"
- #include "ngdata.h"
- #include "artio.h"
- + #ifdef SERVER
- + #include "server.h"
- + #endif
- #include "INTERN.h"
- #include "final.h"
-
- + #ifndef sigmask
- + #define sigmask(m) (1 << ((m)-1))
- + #endif
- +
- void
- final_init()
- {
- ***************
- *** 104,109 ****
- --- 114,122 ----
- if (status < 0) {
- chdir("/usr/tmp");
- sigset(SIGILL,SIG_DFL);
- + #ifdef SIGBLOCK
- + sigsetmask(sigblock(0) & ~(sigmask(SIGILL) | sigmask(SIGIOT)));
- + #endif
- abort();
- }
- exit(status);
- ***************
- *** 112,118 ****
- /* come here on interrupt */
-
- SIGRET
- ! int_catcher()
- {
- sigset(SIGINT,int_catcher);
- #ifdef DEBUGGING
- --- 125,132 ----
- /* come here on interrupt */
-
- SIGRET
- ! int_catcher(dummy)
- ! int dummy;
- {
- sigset(SIGINT,int_catcher);
- #ifdef DEBUGGING
- ***************
- *** 132,137 ****
- --- 146,152 ----
-
- SIGRET
- sig_catcher(signo)
- + int signo;
- {
- #ifdef VERBOSE
- static char *signame[] = {
- ***************
- *** 176,183 ****
- finalize(-1);
- }
- #endif
- ! if (panic)
- abort();
- (void) sigset(SIGILL,SIG_DFL);
- panic = TRUE; /* disable terminal I/O */
- if (doing_ng) { /* need we reconstitute rc line? */
- --- 191,202 ----
- finalize(-1);
- }
- #endif
- ! if (panic) {
- ! #ifdef SIGBLOCK
- ! sigsetmask(sigblock(0) & ~(sigmask(SIGILL) | sigmask(SIGIOT)));
- ! #endif
- abort();
- + }
- (void) sigset(SIGILL,SIG_DFL);
- panic = TRUE; /* disable terminal I/O */
- if (doing_ng) { /* need we reconstitute rc line? */
- Index: final.h
- Prereq: 4.4
- *** final.h Sat Nov 9 14:41:30 1991
- --- ../rn4.4.3/final.h Sat Feb 22 21:53:57 1992
- ***************
- *** 1,6 ****
- ! /* $Id: final.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: final.h,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: final.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: final.h,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 35,41 ****
-
- /* signal catching routines */
-
- ! SIGRET int_catcher ANSI((void));
- SIGRET sig_catcher ANSI((int));
- #ifdef SIGTSTP
- SIGRET stop_catcher ANSI((int));
- --- 38,44 ----
-
- /* signal catching routines */
-
- ! SIGRET int_catcher ANSI((int));
- SIGRET sig_catcher ANSI((int));
- #ifdef SIGTSTP
- SIGRET stop_catcher ANSI((int));
- Index: head.c
- Prereq: 4.4
- *** head.c Sat Nov 9 14:42:18 1991
- --- ../rn4.4.3/head.c Sat Feb 22 21:54:59 1992
- ***************
- *** 1,6 ****
- ! /* $Id: head.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: head.c,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: head.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: head.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 46,51 ****
- --- 49,55 ----
- }
-
- #ifdef DEBUGGING
- + void
- dumpheader(where)
- char *where;
- {
- ***************
- *** 194,201 ****
- char *
- fetchsubj(artnum,current_subject,copy)
- ART_NUM artnum; /* article to get subject from */
- ! bool current_subject; /* is it in a parsed header? */
- ! bool copy; /* do you want it savestr()ed? */
- {
- char *s = Nullch, *t;
- #ifdef SERVER
- --- 198,205 ----
- char *
- fetchsubj(artnum,current_subject,copy)
- ART_NUM artnum; /* article to get subject from */
- ! bool_int current_subject; /* is it in a parsed header? */
- ! bool_int copy; /* do you want it savestr()ed? */
- {
- char *s = Nullch, *t;
- #ifdef SERVER
- ***************
- *** 234,240 ****
- --- 238,252 ----
- if (xhdr) {
- sprintf(ser_line, "XHDR subject %ld", artnum);
- put_server(ser_line);
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf(">%s\n", ser_line) FLUSH;
- + #endif
- if (nntp_get(ser_line, sizeof (ser_line)) >= 0) {
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf("<%s\n", ser_line) FLUSH;
- + #endif
- if (ser_line[0] == CHAR_FATAL) {
- fprintf(stderr,"\nrrn: %s\n",ser_line);
- finalize(1);
- ***************
- *** 241,246 ****
- --- 253,262 ----
- /* xhdr = 0; */
- } else {
- while (nntp_get(ser_line, sizeof (ser_line)) >= 0) {
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf("<%s\n", ser_line) FLUSH;
- + #endif
- if (ser_line[0] == '.')
- break;
- else {
- ***************
- *** 263,268 ****
- --- 279,288 ----
- if (!xhdr) {
- sprintf(ser_line, "HEAD %ld", artnum);
- put_server(ser_line);
- + #ifdef DEBUGGING
- + if (debug & DEB_NNTP)
- + printf(">%s\n", ser_line) FLUSH;
- + #endif
- eoo = 0;
- if (nntp_get(ser_line, sizeof (ser_line)) >= 0 &&
- ser_line[0] == CHAR_OK) {
- Index: head.h
- Prereq: 4.4
- *** head.h Sat Nov 9 14:43:50 1991
- --- ../rn4.4.3/head.h Sat Feb 22 21:55:09 1992
- ***************
- *** 1,6 ****
- ! /* $Id: head.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: head.h,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: head.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: head.h,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 142,150 ****
- #ifdef ASYNC_PARSE
- int parse_maybe ANSI((ART_NUM));
- #endif
- ! char *fetchsubj ANSI((ART_NUM,bool,bool));
- char *fetchlines ANSI((ART_NUM,int));
-
- #ifdef DEBUGGING
- ! int dumpheader ANSI((char *));
- #endif
- --- 145,153 ----
- #ifdef ASYNC_PARSE
- int parse_maybe ANSI((ART_NUM));
- #endif
- ! char *fetchsubj ANSI((ART_NUM,bool_int,bool_int));
- char *fetchlines ANSI((ART_NUM,int));
-
- #ifdef DEBUGGING
- ! void dumpheader ANSI((char *));
- #endif
- Index: init.c
- Prereq: 4.4
- *** init.c Sat Nov 9 14:42:24 1991
- --- ../rn4.4.3/init.c Sat Feb 22 21:55:02 1992
- ***************
- *** 1,6 ****
- ! /* $Id: init.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- *
- * $Log: init.c,v $
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: init.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: init.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:18:23 sob
- * release 4.4
- *
- ***************
- *** 190,244 ****
- util_init();
-
- #ifdef FINDNEWNG
- - /* fstat(actfp->_file,&filestat); ... does not work on Apollos */
- - fstat(fileno(actfp),&filestat); /* did active file grow? */
- /*
- * Skip this check if the -q flag was given.
- */
- !
- ! if (!quickstart && filestat.st_size != lastactsiz) {
- ! long actsiz = filestat.st_size; /* remember new size */
- ! NG_NUM oldnext = nextrcline; /* remember # lines in newsrc */
- ! #ifdef FASTNEW
- ! bool munged = writesoft || !lastactsiz;
- ! /* bad soft ptrs -> edited active */
- ! #else
- ! bool munged = TRUE; /* just assume .newsrc munged */
- ! #endif
- !
- ! #ifdef VERBOSE
- ! IF(verbose)
- ! fputs("\nChecking active list for new newsgroups...\n",stdout)
- ! FLUSH;
- ! ELSE
- ! #endif
- ! #ifdef TERSE
- ! fputs("\nNew newsgroups:\n",stdout) FLUSH;
- ! #endif
- ! #ifdef FASTNEW
- ! if (!munged) { /* maybe just do tail of file? */
- ! fseek(actfp,lastactsiz-NL_SIZE,0);
- ! fgets(buf,LBUFLEN,actfp);
- ! munged = (*buf != '\n');
- ! if (!munged)
- ! munged = newlist(munged,FALSE);
- ! }
- ! #endif
- ! if (munged) { /* must we scan entire file? */
- ! fseek(actfp,0L,0); /* rewind active file */
- ! newlist(munged,FALSE); /* sure hope they use hashing... */
- ! }
- ! lastactsiz = actsiz; /* remember for .rnlast */
- ! if (nextrcline != oldnext) { /* did we add any new groups? */
- foundany = TRUE; /* let main() know */
- ! starthere = 0; /* and start ng scan from the top */
- }
- }
- #endif
- time(&lasttime); /* remember when we inited-- */
- /* ends up back in .rnlast */
- ! writelast(); /* in fact, put it there now */
- !
- #ifdef FINDNEWNG
- # ifdef ONLY
- if (maxngtodo) /* patterns on command line? */
- --- 193,212 ----
- util_init();
-
- #ifdef FINDNEWNG
- /*
- * Skip this check if the -q flag was given.
- */
- ! if (!quickstart) {
- ! if (find_new_groups()) { /* did we add any new groups? */
- foundany = TRUE; /* let main() know */
- ! starthere = 0; /* start ng scan from the top */
- }
- }
- #endif
- time(&lasttime); /* remember when we inited-- */
- /* ends up back in .rnlast */
- ! writelast(); /* in fact, put it there now */
- !
- #ifdef FINDNEWNG
- # ifdef ONLY
- if (maxngtodo) /* patterns on command line? */
- ***************
- *** 333,339 ****
- char *newsnewsname = filexp(NEWSNEWSNAME);
-
- if ((tmpfp = fopen(newsnewsname,"r")) != Nullfp) {
- - /* fstat(tmpfp->_file,&filestat); .... does not work on Apollos */
- fstat(fileno(tmpfp),&filestat);
- if (filestat.st_mtime > lasttime) {
- while (fgets(buf,sizeof(buf),tmpfp) != Nullch)
- --- 301,306 ----
- Index: intrp.c
- Prereq: 4.4.2.1
- *** intrp.c Sun Dec 1 12:09:20 1991
- --- ../rn4.4.3/intrp.c Sat Feb 22 21:54:24 1992
- ***************
- *** 1,6 ****
- ! /* $Id: intrp.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- *
- * $Log: intrp.c,v $
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- --- 1,9 ----
- ! /* $Id: intrp.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: intrp.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- * Patchlevel 2 changes
- *
- ***************
- *** 715,723 ****
- s = getval("NAME",realname);
- break;
- case 'o': /* organization */
- s = getenv("NEWSORG");
- ! if ( s == Nullch)
- s = getval("ORGANIZATION",orgname);
- #ifdef ORGFILE
- if (*s == '/') {
- FILE *ofp = fopen(s,"r");
- --- 718,730 ----
- s = getval("NAME",realname);
- break;
- case 'o': /* organization */
- + #ifdef IGNOREORG
- + s = getval("NEWSORG",orgname);
- + #else
- s = getenv("NEWSORG");
- ! if (s == Nullch)
- s = getval("ORGANIZATION",orgname);
- + #endif
- #ifdef ORGFILE
- if (*s == '/') {
- FILE *ofp = fopen(s,"r");
- ***************
- *** 725,732 ****
- if (ofp) {
- fgets(scrbuf,sizeof scrbuf,ofp);
- fclose(ofp);
- s = scrbuf;
- - s[strlen(s)-1] = '\0';
- }
- }
- #endif
- --- 732,741 ----
- if (ofp) {
- fgets(scrbuf,sizeof scrbuf,ofp);
- fclose(ofp);
- + s = scrbuf+strlen(scrbuf)-1;
- + if (*s == '\n')
- + *s = '\0';
- s = scrbuf;
- }
- }
- #endif
- ***************
- *** 1094,1100 ****
- long uid;
- {
- char *s, *c;
- ! char tmpbuf[512];
- #ifdef PASSNAMES
- #ifdef GETPWENT
- #ifdef notdef
- --- 1103,1109 ----
- long uid;
- {
- char *s, *c;
- !
- #ifdef PASSNAMES
- #ifdef GETPWENT
- #ifdef notdef
- ***************
- *** 1104,1110 ****
- --- 1113,1121 ----
-
- s = pwd->pw_gecos;
- #else
- + char tmpbuf[512];
- int i;
- +
- getpw(uid, tmpbuf);
- for (s=tmpbuf, i=GCOSFIELD-1; i; i--) {
- if (s)
- ***************
- *** 1136,1142 ****
- *c = '\0';
- if ((c = index(s, '-')) != Nullch)
- s = c;
- ! strcpy(buf,tmpbuf);
- #endif
- #ifdef GETPWENT
- endpwent();
- --- 1147,1153 ----
- *c = '\0';
- if ((c = index(s, '-')) != Nullch)
- s = c;
- ! strcpy(buf,s);
- #endif
- #ifdef GETPWENT
- endpwent();
- Index: last.c
- Prereq: 4.4
- *** last.c Sat Nov 9 14:41:27 1991
- --- ../rn4.4.3/last.c Sat Feb 22 21:53:53 1992
- ***************
- *** 1,6 ****
- ! /* $Id: last.c,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- *
- * $Log: last.c,v $
- * Revision 4.4 1991/09/09 20:23:31 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: last.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: last.c,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:23:31 sob
- * release 4.4
- *
- ***************
- *** 43,48 ****
- --- 46,59 ----
- lasttime = atol(tcbuf);
- fgets(tcbuf,1024,tmpfp);
- lastactsiz = atol(tcbuf);
- + if (fgets(tcbuf,1024,tmpfp) != Nullch)
- + lastnewtime = atol(tcbuf);
- + else
- + lastnewtime = (lasttime? lasttime : time(Null(time_t*))-24L*60*60);
- + if (fgets(tcbuf,1024,tmpfp) != Nullch)
- + lastnewsize = atol(tcbuf);
- + else
- + lastnewsize = 0;
- fclose(tmpfp);
- }
- else {
- ***************
- *** 49,54 ****
- --- 60,68 ----
- lastngname = nullstr;
- lasttime = 0;
- lastactsiz = 0;
- + lastnewsize = 0;
- + /* Use yesterday as an initial value for finding new groups. */
- + lastnewtime = time(Null(time_t*)) - 24L*60*60;
- }
- }
-
- ***************
- *** 58,65 ****
- writelast()
- {
- if ((tmpfp = fopen(lastname,"w")) != Nullfp) {
- ! fprintf(tmpfp,"%s\n%ld\n%ld\n",
- ! (ngname==Nullch?nullstr:ngname),(long)lasttime,(long)lastactsiz);
- fclose(tmpfp);
- }
- else
- --- 72,80 ----
- writelast()
- {
- if ((tmpfp = fopen(lastname,"w")) != Nullfp) {
- ! fprintf(tmpfp,"%s\n%ld\n%ld\n%ld\n%ld\n",
- ! (ngname==Nullch?nullstr:ngname),(long)lasttime,(long)lastactsiz,
- ! (long)lastnewtime,(long)lastnewsize);
- fclose(tmpfp);
- }
- else
- Index: last.h
- Prereq: 4.4
- *** last.h Sat Nov 9 14:41:35 1991
- --- ../rn4.4.3/last.h Sat Feb 22 21:53:59 1992
- ***************
- *** 1,6 ****
- ! /* $Id: last.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- *
- * $Log: last.h,v $
- * Revision 4.4 1991/09/09 20:23:31 sob
- * release 4.4
- *
- --- 1,9 ----
- ! /* $Id: last.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
- *
- * $Log: last.h,v $
- + * Revision 4.4.3.1 1992/02/01 03:09:32 sob
- + * Release 4.4 Patchlevel 3
- + *
- * Revision 4.4 1991/09/09 20:23:31 sob
- * release 4.4
- *
- ***************
- *** 23,28 ****
- --- 26,33 ----
- EXT char *lastngname INIT(Nullch); /* last newsgroup read, from .rnlast file */
- EXT long lasttime INIT(0); /* time last rn was started up */
- EXT long lastactsiz INIT(0); /* size of active file when rn last started up */
- + EXT long lastnewtime INIT(0); /* time last new group was found */
- + EXT long lastnewsize INIT(0); /* size of active.times file when rn last started up */
-
- void last_init ANSI((char *));
- void writelast ANSI((void));
-